﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MetroFramework.Forms;
using Managistics.Warehouse.Views.Interfaces;

namespace Managistics.Warehouse
{
    public partial class Dashboard : MetroForm, IDashboardView
    {
        public Dashboard()
        {
            InitializeComponent();

            base.Closed += delegate { Closed(); };
        }

        public new event Action Closed = delegate { };

        public void Open()
        {
            //ShowDialog();
        }

        public void Open(IView view)
        {
            this.MdiParent = (Form)view;
            this.WindowState = FormWindowState.Maximized;
            this.Dock = DockStyle.Fill;
            this.Show();
            this.BringToFront();
        }
    }
}
